/* 菜单高度修复样式 */

/* 确保菜单容器占满高度 */
#GLOBAL_SIDER_MENU_ID {
  height: 100% !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* 菜单包装器高度修复 */
.menu-wrapper {
  height: 100% !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;

  .simple-scrollbar {
    height: 100% !important;
    flex: 1;
    min-height: 0;
  }
}

/* Ant Design 菜单高度修复 */
.ant-menu-inline {
  height: 100% !important;
  min-height: 100%;
  border-right: none !important;
  display: flex;
  flex-direction: column;
}

.ant-menu {
  height: 100% !important;
  min-height: 100%;
}

/* 垂直混合菜单高度修复 */
.vertical-mix-menu {
  height: 100% !important;

  .first-level-menu {
    height: 100% !important;
  }

  .child-menu-container {
    height: 100% !important;
  }
}

/* 水平菜单高度修复 */
.horizontal-menu {
  height: 100% !important;
  display: flex;
  align-items: center;
}

/* 商务风格菜单优化 */
.business-style {
  /* 菜单容器 */
  #GLOBAL_SIDER_MENU_ID {
    background: #fff;
    border-right: 1px solid #f0f0f0;
  }

  /* 菜单项样式 */
  .ant-menu-inline {
    .ant-menu-item {
      border-radius: 6px;
      margin: 4px 8px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }

      &.ant-menu-item-selected {
        background-color: rgba(24, 144, 255, 0.1);
        color: #1890ff;
        font-weight: 500;
      }
    }

    .ant-menu-submenu-title {
      border-radius: 6px;
      margin: 4px 8px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }
    }

    .ant-menu-sub {
      .ant-menu-item {
        margin-left: 16px;
        width: calc(100% - 32px);
      }

      .ant-menu-submenu-title {
        margin-left: 16px;
        width: calc(100% - 32px);
      }
    }
  }

  /* 水平菜单商务风格 */
  .ant-menu-horizontal {
    .ant-menu-item {
      border-radius: 6px;
      margin: 0 4px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }

      &.ant-menu-item-selected {
        background-color: rgba(24, 144, 255, 0.1);
        color: #1890ff;
        font-weight: 500;
      }
    }

    .ant-menu-submenu-title {
      border-radius: 6px;
      margin: 0 4px;
      transition: all 0.2s ease;

      &:hover {
        background-color: rgba(24, 144, 255, 0.05);
      }
    }
  }
}

/* 暗色主题适配 */
.dark {
  .business-style {
    #GLOBAL_SIDER_MENU_ID {
      background: #1f1f1f;
      border-right-color: #303030;
    }

    .ant-menu-inline {
      .ant-menu-item {
        &:hover {
          background-color: rgba(24, 144, 255, 0.1);
        }

        &.ant-menu-item-selected {
          background-color: rgba(24, 144, 255, 0.2);
        }
      }

      .ant-menu-submenu-title {
        &:hover {
          background-color: rgba(24, 144, 255, 0.1);
        }
      }
    }

    .ant-menu-horizontal {
      .ant-menu-item {
        &:hover {
          background-color: rgba(24, 144, 255, 0.1);
        }

        &.ant-menu-item-selected {
          background-color: rgba(24, 144, 255, 0.2);
        }
      }

      .ant-menu-submenu-title {
        &:hover {
          background-color: rgba(24, 144, 255, 0.1);
        }
      }
    }
  }
}

/* 响应式修复 */
@media (max-width: 768px) {
  .menu-wrapper {
    height: 100% !important;
  }

  .ant-menu-inline {
    height: 100% !important;
  }
}
